.class public Lcom/glympse/android/glympse/DlgSendComplete$RecipientAdapter;
.super Landroid/widget/ArrayAdapter;
.source "DlgSendComplete.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/DlgSendComplete;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "RecipientAdapter"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/widget/ArrayAdapter",
        "<",
        "Lcom/glympse/platform/common/Recipient;",
        ">;"
    }
.end annotation


# instance fields
.field private m_oLayoutInflater:Landroid/view/LayoutInflater;

.field final synthetic this$0:Lcom/glympse/android/glympse/DlgSendComplete;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/DlgSendComplete;Landroid/content/Context;Ljava/util/List;)V
    .locals 1
    .parameter
    .parameter "oContext"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lcom/glympse/platform/common/Recipient;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 187
    .local p3, listRecipients:Ljava/util/List;,"Ljava/util/List<Lcom/glympse/platform/common/Recipient;>;"
    iput-object p1, p0, Lcom/glympse/android/glympse/DlgSendComplete$RecipientAdapter;->this$0:Lcom/glympse/android/glympse/DlgSendComplete;

    .line 185
    const/4 v0, 0x0

    invoke-direct {p0, p2, v0, p3}, Landroid/widget/ArrayAdapter;-><init>(Landroid/content/Context;ILjava/util/List;)V

    .line 180
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/glympse/android/glympse/DlgSendComplete$RecipientAdapter;->m_oLayoutInflater:Landroid/view/LayoutInflater;

    .line 186
    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/glympse/android/glympse/DlgSendComplete$RecipientAdapter;->m_oLayoutInflater:Landroid/view/LayoutInflater;

    return-void
.end method


# virtual methods
.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 11
    .parameter "nPosition"
    .parameter "oView"
    .parameter "oParent"

    .prologue
    const/4 v3, 0x1

    const/high16 v4, 0x3f00

    const/4 v10, 0x0

    .line 192
    invoke-virtual {p0, p1}, Lcom/glympse/android/glympse/DlgSendComplete$RecipientAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/glympse/platform/common/Recipient;

    .line 194
    .local v8, oRecipient:Lcom/glympse/platform/common/Recipient;
    iget-object v1, p0, Lcom/glympse/android/glympse/DlgSendComplete$RecipientAdapter;->m_oLayoutInflater:Landroid/view/LayoutInflater;

    const v2, 0x7f03001e

    invoke-virtual {v1, v2, p3, v10}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p2

    .line 196
    const v1, 0x7f0c006c

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/ImageView;

    invoke-static {v8}, Lcom/glympse/android/glympse/Glympse;->GetRecipientImage(Lcom/glympse/platform/common/Recipient;)I

    move-result v1

    invoke-virtual {p0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 197
    const v1, 0x7f0c0006

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    check-cast p0, Landroid/widget/TextView;

    invoke-virtual {v8}, Lcom/glympse/platform/common/Recipient;->GetDisplayText()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 199
    const v1, 0x7f0c006d

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/ImageView;

    .line 202
    .local v7, oImageResult:Landroid/widget/ImageView;
    const/4 v1, 0x4

    iget v2, v8, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    if-ne v1, v2, :cond_1

    .line 204
    const v1, 0x7f020095

    invoke-virtual {v7, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 205
    invoke-virtual {v7, v10}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 223
    :goto_0
    iget-object v1, v8, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    invoke-static {v1}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 225
    const v1, 0x7f0c006e

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/widget/TextView;

    .line 226
    .local v9, oTextView:Landroid/widget/TextView;
    iget-object v1, v8, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    invoke-virtual {v9, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 227
    invoke-virtual {v9, v10}, Landroid/widget/TextView;->setVisibility(I)V

    .line 230
    .end local v9           #oTextView:Landroid/widget/TextView;
    :cond_0
    return-object p2

    .line 207
    :cond_1
    const-wide/16 v1, 0x0

    iget-wide v5, v8, Lcom/glympse/platform/common/Recipient;->m_lCreatedTime:J

    cmp-long v1, v1, v5

    if-eqz v1, :cond_3

    .line 208
    iget v1, v8, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    if-eqz v1, :cond_2

    .line 209
    const/4 v1, 0x5

    iget v2, v8, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    if-ne v1, v2, :cond_3

    .line 211
    :cond_2
    const v1, 0x7f020097

    invoke-virtual {v7, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 212
    invoke-virtual {v7, v10}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_0

    .line 216
    :cond_3
    new-instance v0, Landroid/view/animation/RotateAnimation;

    const/4 v1, 0x0

    const v2, 0x470ca000

    move v5, v3

    move v6, v4

    invoke-direct/range {v0 .. v6}, Landroid/view/animation/RotateAnimation;-><init>(FFIFIF)V

    .line 217
    .local v0, oAni:Landroid/view/animation/Animation;
    const/4 v1, -0x1

    invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setRepeatCount(I)V

    .line 218
    new-instance v1, Landroid/view/animation/LinearInterpolator;

    invoke-direct {v1}, Landroid/view/animation/LinearInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setInterpolator(Landroid/view/animation/Interpolator;)V

    .line 219
    const-wide/32 v1, 0x1adb0

    invoke-virtual {v0, v1, v2}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 220
    invoke-virtual {v7, v0}, Landroid/widget/ImageView;->startAnimation(Landroid/view/animation/Animation;)V

    goto :goto_0
.end method
